<div class="main-content">
	<div class="breadcrumbs" id="breadcrumbs">
		<script type="text/javascript">
			try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
		</script>

		<ul class="breadcrumb">
			<li>
				<i class="icon-home home-icon"></i>
				<a href="#">系统首页</a>
			</li>
			<li class="active">
				用户列表
			</li>
            <li class="active">
				用户余额明细
			</li>
		</ul><!-- .breadcrumb -->
	</div>
	<!-- Main content -->
	<div class="page-content">
    	<div class="row">
    	    <div class="page-header">
    			<h1>用户余额明细列表</h1>
    		</div>
    		<div class=" col-md-12 col-sm-12 col-xs-12 form">
                <div class="row">
                </div>
            </div>
            <input type="hidden" name="upid" id="upid" value=""/>
            <div class="col-xs-12 margin_t margin_b">
				<div class="table-responsive  tab">
					<table id="sample-table-1" class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								<th>事件类型</th>
                                <th>变更金额</th> 
                                <th>变更后余额</th>
                                <th>备注</th>
                                <th>创建时间</th>
							</tr>
						</thead> 
						<tbody>
						<?php if (isset($result)&&count($result)>0){
                            	foreach ($result as $app){
                            	?>
								
							<?php if($app->amount!=0.00):?>	
							<tr>
                                <td><p><?php 
								
                                	if($app->event == 1){
                                		echo "订单收入";
                                	}elseif($app->event == 2){
                                		echo "提现支出";
                                	}elseif($app->event == 3){
                                		echo "广告收入";
									}elseif($app->event == 4){
                                		echo "余额支付";	
                                	}elseif ($app->event == 5){
                                	    echo "订单退款";
                                	}elseif ($app->event == 6){
                                        echo "提现失败";
                                    }
                                	?></p></td>
                                <td><p><?php
                                	if($app->event == 1){
                                		echo "+".$app->amount;
                                	}elseif($app->event == 2){
                                		echo "-".$app->amount;
									}elseif($app->event == 4){
                                		echo "-".$app->amount;	
                                	}elseif($app->event == 3){
                                		echo "+".$app->amount;
                                	}elseif($app->event == 5){
                                	    echo "+".$app->amount;
                                	}elseif($app->event == 6){
                                        echo "+".$app->amount;
                                    }
                                	?></p></td>
                                <td><p>
                                <?php
                                    echo $app->amount_log;
                                	?>
                                </p></td>
                                <td><p><?php echo $app->note;?></p></td>
                                <td><p><?php echo $app->create_time;?></p></td>
    						</tr>
							<?php endif;?>
    						<?php }
                            }else{?>
                            <tr>
                            	<td colspan="5">无数据</td>
                            </tr>
                            <?php }?>
                            </tbody>
                         </table>
                     </div><!-- /.table-responsive -->
				</div>
                <div class="col-sm-12">
                	<div class="modal-footer no-margin-top">
	                	<div class="pull-left record">
							共<?php echo $count;?>条记录
	                    </div>
                		<?php if (isset($page))echo $page;?>
                	</div>
                </div>
            </div><!-- /.row -->
		</div><!-- /.page-content -->
	</div><!-- /.main-content -->